package jsu.ask.dao;

import jsu.ask.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    //增加用户
    int addUser(User user);

    //删除用户
    int deleteUserById(@Param("uid") int id);

    //更新用户
    int updateUser(User user);

    //查询一个用户
    User queryUserById(@Param("uid") int id);

    //登录验证
    User queryUser(@Param("username") String username,@Param("userpassword") String userpassword);

    //查询全部的用户
    List<User> queryAllUser();

    //后期改进为模糊搜索
    User queryUserByName(@Param("username") String username);
}
